<?php

namespace app\common\model;

use think\Model;
use think\model\concern\SoftDelete;

class Activity extends Model
{
    //软删除
    use SoftDelete;

    public function _update($data)
    {
        if (isset($data['id'])){
            //修改
            return $this->save($data,['id' => $data['id']]);
        }else{
            //添加
            return $this->save($data);
        }
    }
}
